#include <stdio.h>
#include <math.h>
#include "mpi.h"
//mpicc -std=c99 -o cmake-build/mpi/test1 mpi/test1.c && mpirun -np 4 ./cmake-build/mpi/test1
int main(int argc, char *argv[])
{
    int numprocs,procnum,namelen;
    char pro_name[MPI_MAX_PROCESSOR_NAME];
    MPI_Init(&argc, &argv);
    MPI_Comm_rank(MPI_COMM_WORLD, &procnum);
    MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
    MPI_Get_processor_name(pro_name,&namelen);
    printf("Hello world! Processor %d of %d on %s %d\n", procnum, numprocs,pro_name,namelen);
    MPI_Finalize();
    return 0;
}
